#!/usr/bin/env python
# -*- coding: utf-8 -*-

import threading
import pygtk
import gtk
import vista
import modelo
import controlador

class Main(threading.Thread):
    def __init__(self):
        threading.Thread.__init__(self)

    def run(self):
        gtk.gdk.threads_init()
        gtk.main()

    def stop(self):
        gtk.main_quit()
        
if __name__ == "__main__":
    main = Main()
    modelo = modelo.Modelo()
    controlador1 = controlador.Controlador(modelo)
    vista = vista.Vista(controlador1)
    controlador1.registrar_vista(vista)
    main.start()